<?php
class rssViewService implements IViewService{

    private $rss;
    
    private $view;

    public function __construct(&$view){
        $this->view = $view;
    }

    public function render(){
        Application::get()->Http->setHeader('Content-type','application/xhtml+xml');
        $output = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
        $output .= "<rss version=\"2.0\">\n\t<channel>\n";
        $output .= $this->rss;
        $output .= "\t</channel>\n</rss>\n";
        return $output;
    }

    public function getInstance(){
        return $this->channel;
    }

    public function header($title,$description){
        $this->rss = "\t\t<title>".$title."</title>\n\t\t<description>".$description."</description>\n";
    }
}
?>